<?php
include('../../inc/global.inc');
include("../islogin.php");
$id = intval($_GET['id']);
$row=$db->get_one("SELECT * FROM `sd_tuoguan` WHERE id=$id and status=5");
if(!$row){
 echo "<script>location='/err.html';</script>";
}
if(isset($_POST['submit']) && $_POST['submit'])
{
	$array2['content2']=$_POST['info']['content'];
	$array2['guanliyuan']=$_SESSION['admin_user'];
	$array2['gtime']=time();
	$array2['status'] = 6;//交易成功
	$true = $db->update('sd_tuoguan', $array2,"id=".$_POST['info']['tuoguanid']);
	
	if($true)
	{
		
		echo "<script>alert('交易成功');location='index.php';</script>";exit;
	}
	else
	{
		echo "<script>alert('确认失败，未知原因。请联系管理员');location='".HTTP_REFERER."';</script>";exit;
	}
}
?>
<HTML>
<HEAD>
<TITLE>Admin</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<LINK href="../css/css.css" rel=stylesheet>
<script type='text/javascript' src="../js/islogin.js" charset="gb2312"></script>
<script src="../../js/jquery.js"></script>
</HEAD>
<BODY>
<center>
  <table width="95%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
    <tr>
      <td height="25" bgcolor="#EEEEF9" style="padding-left:5px;">确认收货&nbsp;&nbsp;<a href="javascript:history.go(-1)">Back</a></td>
    </tr>
  </table>
  <div>
  		<br />
  		打款给卖家后，点击确认，即可完成托管交易。
        <form action="" method="post" onsubmit="return check();">
               		<input type="hidden" name="info[tuoguanid]" value="<?php echo $id;?>" />
					<table width="100%" border="0" cellpadding="0" cellspacing="0" >
					 <tr>
		                <td height="30" bgcolor="#EFF6FF" align="center">确定时间：</td>
		                <td colspan="2" bgcolor="#f9f9f9"><input name="ftime"  id="ftime" type="text" class="txt5" value="<?php echo date('Y-m-d H:i:s');?>"/></td>
	                </tr>
					
                    <tr>
		                <td height="30" bgcolor="#EFF6FF" align="center">备注：</td>
		                <td colspan="2" bgcolor="#f9f9f9"><textarea name="info[content]" class="txt3" cols="70" rows="15"></textarea></td>
	                </tr>
					  <tr>
		                <td height="35" bgcolor="#EFF6FF">&nbsp;</td>
		                <td colspan="2" bgcolor="#f9f9f9">&nbsp;<input name="submit" type="submit" id="submit" value="提交" class="btn1"/></td>
	                </tr>
                    <tr>
		                <td height="35"  align="center" bgcolor="#EFF6FF">&nbsp;</td>
		                <td colspan="2" bgcolor="#f9f9f9"></td>
	                </tr>
                 </table></form>
  </div>
</center>
</BODY>
</HTML>
<script>
	function check()
	{
	}
</script>